//package wondersgroup.hsswidget.slidingcard;
//
//import android.content.Context;
//import android.content.res.TypedArray;
//import android.graphics.Canvas;
//import android.graphics.Rect;
//import android.support.design.widget.CoordinatorLayout;
//import android.support.v4.view.LayoutInflaterCompat;
//import android.support.v7.widget.LinearLayoutManager;
//import android.support.v7.widget.OrientationHelper;
//import android.support.v7.widget.RecyclerView;
//import android.text.TextUtils;
//import android.util.AttributeSet;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.widget.FrameLayout;
//import android.widget.TextView;
//
//import wondersgroup.hsswidget.R;
//import wondersgroup.hsswidget.adapter.DividerItemDecoration;
//import wondersgroup.hsswidget.adapter.SimpleRecycleAdapter;
//
///**
// * @author 黄赛赛
// * @version V1.0
// * @Title: ${file_name}
// * @Package ${package_name}
// * @Description: ${todo}()
// * @date 2016/10/19 14:28
// */
//@CoordinatorLayout.DefaultBehavior (SlidingCardBehavior.class)
//public class SlidingCardLayout extends FrameLayout {
//
//    int mHeaderViewHeight;
//
//    public SlidingCardLayout(Context context) {
//        this(context, null);
//    }
//
//    public SlidingCardLayout(Context context, AttributeSet attrs) {
//        this(context, attrs, 0);
//    }
//
//    public SlidingCardLayout(Context context, AttributeSet attrs, int defStyleAttr) {
//        super(context, attrs, defStyleAttr);
//
//        LayoutInflater.from(context).inflate(R.layout.item_sliding_card,this);
//        RecyclerView list= (RecyclerView) findViewById(R.id.list);
//
//        TextView tv_name= (TextView) findViewById(R.id.tv_name);
//
//        SimpleRecycleAdapter adapter = new SimpleRecycleAdapter(context);
//        list.setAdapter(adapter);
//
//        LinearLayoutManager layoutManager = new LinearLayoutManager(context);
//        layoutManager.setOrientation(OrientationHelper.VERTICAL);
//        list.setHasFixedSize(true);
//        list.setLayoutManager(layoutManager);
//        list.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL_LIST));
//
//
//        TypedArray a= context.obtainStyledAttributes(attrs,R.styleable.SlidingCardLayout);
//        int color = a.getColor(R.styleable.SlidingCardLayout_header_backgroud_color, -1);
//        String value = a.getString(R.styleable.SlidingCardLayout_header_value);
//        if (color != -1){
//            tv_name.setBackgroundColor(color);
//        }
//
//        if (!TextUtils.isEmpty(value)){
//            tv_name.setText(value);
//        }
//    }
//
//
//    @Override
//    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
//        super.onSizeChanged(w, h, oldw, oldh);
//        if (w != oldw || h != oldh){
//            mHeaderViewHeight = findViewById(R.id.header).getMeasuredHeight();
//        }
//    }
//
//    public int  getmHeaderViewHeight(){
//        return mHeaderViewHeight;
//    }
//
//
//}
